package p270jp.pxv.android.legacy.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/* renamed from: jp.pxv.android.legacy.model.PixivWork */
/* loaded from: classes2.dex */
public class PixivWork implements Serializable {
    public String caption;
    public Date createDate;

    /* renamed from: id */
    public long f19079id;
    public PixivImageUrls imageUrls;
    public boolean isBookmarked;
    public boolean isMuted;
    public boolean isMypixivOnly;
    public boolean isXRestricted;
    public int pageCount;
    public int sanityLevel;
    public List<PixivTag> tags;
    public String title;
    public int totalBookmarks;
    public int totalComments;
    public int totalView;
    public PixivUser user;
    public boolean visible;
    public int xRestrict;

    /* renamed from: jp.pxv.android.legacy.model.PixivWork$SanityLevel */
    /* loaded from: classes2.dex */
    public enum SanityLevel {
        UNCHECKED(0),
        GRAY(1),
        WHITE(2),
        SEMI_BLACK(4),
        BLACK(6),
        ILLEGAL(7);
        
        private int value;

        SanityLevel(int i) {
            this.value = i;
        }

        public static SanityLevel valueOF(int i) {
            SanityLevel[] values = values();
            SanityLevel sanityLevel = null;
            for (SanityLevel sanityLevel2 : values) {
                if (sanityLevel2.getValue() == i) {
                    sanityLevel = sanityLevel2;
                }
            }
            return sanityLevel != null ? sanityLevel : UNCHECKED;
        }

        public int getValue() {
            return this.value;
        }
    }

    /* renamed from: jp.pxv.android.legacy.model.PixivWork$XRestrict */
    /* loaded from: classes2.dex */
    public enum XRestrict {
        NOTR18(0),
        R18(1),
        R18G(2);
        
        private int value;

        XRestrict(int i) {
            this.value = i;
        }

        public static XRestrict valueOF(int i) {
            XRestrict[] values = values();
            XRestrict xRestrict = null;
            for (XRestrict xRestrict2 : values) {
                if (xRestrict2.getValue() == i) {
                    xRestrict = xRestrict2;
                }
            }
            return xRestrict != null ? xRestrict : NOTR18;
        }

        public int getValue() {
            return this.value;
        }
    }

    public SanityLevel getSanityLevel() {
        return SanityLevel.valueOF(this.sanityLevel);
    }

    public XRestrict getXRestrict() {
        return XRestrict.valueOF(this.xRestrict);
    }

    public GoogleNg resolveGoogleNg() {
        XRestrict xRestrict = getXRestrict();
        SanityLevel sanityLevel = getSanityLevel();
        if (xRestrict == XRestrict.R18 || xRestrict == XRestrict.R18G) {
            return GoogleNg.R18;
        }
        if (sanityLevel == SanityLevel.BLACK || sanityLevel == SanityLevel.ILLEGAL) {
            return GoogleNg.GRAY;
        }
        return GoogleNg.WHITE;
    }
}
